<template>
  <div class="mian-page">
    <div class="page-top">
      <Header ref="header" v-show="$store.state.navState == 0" />
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
import Header from "./components/Header.vue";
export default {
  data() {
    return {
      header: 0
    };
  },
  components: {
    Header
  },
  beforeCreate() {
    this.$store.dispatch("setWebProvider");
  },
  watch: {
    $route(to, from) {
      console.log(to.path);
      if (to.path == "/activitydist") {
        this.$store.commit("setNav", 1);
      } else {
        this.$store.commit("setNav", 0);
      }
    }
  }
};
</script>

<style>
#app {
  font-family: SimHei;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  font-weight: 400;
  height: 100%;
  width: 100%;
}
html,
body {
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 100%;
  font-size: 16px;
  -moz-user-select: none; /*火狐*/
  -webkit-user-select: none; /*webkit浏览器*/
  -ms-user-select: none; /*IE10*/
  -khtml-user-select: none; /*早期浏览器*/
  user-select: none;
}
a {
  text-decoration: none;
  color: #fff;
}
.active {
  color: #444 !important;
}
img {
  display: block;
}
.mian-page {
  height: 100%;
}
</style>
